<!-- [Left menu] start -->
<div class="leftmenu">

	<h1 id="pageinfo">Quick Launch</h1>
	
	<ul id="tabs" class="quickmenu">
		<li><a href="<?=site_url('contacts/create')?>">Create Contact</a></li>
		<li><a href="<?=site_url('contacts/index')?>">Import</a></li>
	</ul>
	<div class="quickend">

	</div>

</div>
<!-- [Left menu] end -->

<!-- [Content] start -->
<div class="content slim">

<script type="text/javascript">
function change_parent() {
	selected = document.getElementById('parent').selectedIndex;
	document.getElementById('pre_uri').innerHTML = '/'+document.getElementById('parent').options[selected].value;
}
</script>

<h1 id="edit">Contacts</h1>
	
<form class="edit" action="<?=site_url('rfq/create')?>" method="post" accept-charset="utf-8">
 	

	
		<br class="clearfloat" />

		<hr />

		<?php if ($notice = $this->session->flashdata('notification')):?>
		<p class="notice"><?=$notice;?></p>
		<?php endif;?>


	<div class="row">
	<table>
		<tr>
			<td>
			<form class="search_form" action="" method="post">
			<table>
				<tr>
				<td><span><label for="part_number"><?php echo $this->lang->line('search_partnumber');?>:</label>
					<input id="part_number" type="text" name="part_number" value="" maxlength="100" size="20" />
					</span></td>
				<td><span><label for="parttype"><?php echo $this->lang->line('search_parttype');?>:</label>
					<input id="parttype" type="text" name="parttype" value="" maxlength="100" size="20" /></span></td>
				<td><span><label for="part_description"><?php echo $this->lang->line('search_part_description');?>:</label>
					<input id="part_description" type="text" name="part_description" value="" maxlength="100" size="20" /></span></td>
				</tr>
			</table>
			
			<input name="commit" type="submit" value="Search" /></td>
			</form>

			</td>
		</tr>
	</table>
	</div>

<hr />
	<div class="row">
		<h2 id="edit">Contact List</h2>

			<table class="rfq-list">
				<thead>
					<tr>
						<th nowrap width="1%">#</th>
						<th nowrap width="24%">Name</th>
						<th nowrap width="29%">Vendor</th>
						<th nowrap width="6%">Phone</th>
						<th nowrap width="40%">Email</th>
					</tr>
				</thead>
				<tbody>
				<?php
				if (isset($total_rows) && $total_rows == 0):
				?>
    					<tr>
      						<td colspan="5">
							<?php echo $this->lang->line('contacts_no_contact_match');?>
      						</td>
    					</tr>
				<?php
				else: 
					foreach($query->result() as $row): ?>
					
					<tr>
						<td>

							<?php echo anchor('contacts/show/'.$row->contact_id, $row->contact_id);?>
						</td>
						<td>
							<?php echo anchor('contacts/show/'.$row->contact_id, $row->first_name);?>
						</td>
						<td>
							<?=$row->street1;?>
						</td>
						<td>
							<?=$row->zipcode;?>
						</td>
						<td>
							<?=$row->country;?>
						</td>

					</tr>
				<?php 
					endforeach;
					endif; ?>
				</tbody>
			</table>

		
	</div>
</form>
<script>
	var tabs = new Control.Tabs('tabs',{
		defaultTab: 'last'
	})
	tabs.setActiveTab('one');
</script>

</div>



